<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="static/bootstrap/css/bootstrap.min.css" />
</head>
<body class="body">
	<%@ include file="top.jsp"%>
	<div class="container"style="padding:60px">
	  <%@ include file="left.jsp"%>
		<div class="span9">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0">
				<li class="active">
					<a href="task.html"><i class="icon-user"></i>联系人</a>
				</li>
			</ul>
			<div class="wall"style="margin-top:20px">
				<div class="row">
					<div class="span3">
						<div>
						<a href="contact.jspx?m=newcontact" class="btn span2"><i class="icon-plus"></i>添加联系人</a>
						</div>
						<div class="clear"></div>
						<!--这里写for循环遍历联系人名单-->
						
						<div style="padding-top:15px">
							<ul class="unstyled" style="margin-top:15px">
								<c:forEach items="${sessionScope.contactList}" var="contact">
									<li style="line-height:30px">
										<i class="icon-list-alt"></i><a href="contact.jspx?m=information&&id=${contact.id }" >${contact.name}</a>
									</li>
								</c:forEach>
							</ul>
						</div>
						
					</div>
					
					<!--这里传一个列表中的联系人-->
					<div class="span4" style="min-height:400px;border-left:1px solid #ccc;padding-left:15px">
						<address>
						<c:if test="${requestScope.contact != null }">
							<div>
								<div>
									<h3>${contact.name}</h3>
									<p>${contact.company}</p>
								   <small>手机</small> ${contact.telephone}<br/>
								   <small>固话</small> ${contact.phone}<br/><br/>
								   <small>邮箱</small> ${contact.email}<br/>
								   <small>地址</small> ${contact.address}<br/><br/>
								   <small>主页</small> <a href="http://${contact.index}">${contact.index}</a><br/>
								   <small>微博</small> <a href="http://${contact.bolgType}.${contact.username}">@ ${contact.username}</a><br/>
								</div>
								<!-- <div class="span1">
									<img src="contact.jspx"/>
								</div> -->	
							</div>
								
						</c:if>
						</address>
						<div class="line">记录</div>
						<c:forEach items="${requestScope.recordList}" var="record" end="2">
							<blockquote>
							 <p>${record.content }</p>
							  <small>${record.member.name }发布于${record.time } </small>
							</blockquote>
						</c:forEach>
						<a href="contact.jspx?m=allrecord&&id=${contact.id} ">查看所有记录</a>
						<br/><br/><br/>
						<a class="btn btn-primary" href="contact.jspx?m=edit&&id=${contact.id }"><i class="icon-pencil icon-white"></i>编辑</a>
						<a class="btn btn-danger" href="contact.jspx?m=del&&id=${contact.id }"><i class="icon-trash icon-white"></i>删除</a>
					</div>
				</div>
			</div>
		</div>
	  </div>
	</div>
	<script type="text/javascript" src="static/jquery/jquery.js"></script>
	<!-- <script type="text/javascript">
		$(document).ready(function(){
			$(".contact").click(function(){
				var id= $(this).attr("id");
				$.get("contact.jspx?m=information",{id:id},function(data){
					var name = $(data).find("name").text();
					alert(name);
					
				})
			})
		})
	</script> -->
</body>
</html>